/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/<a href="https://www.kaaction.com">KAA</a>"><a href="https://www.kaaction.com">KAA</a></a> All rights reserved.
 */
package com.kaaction.modules.ka.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.kaaction.common.persistence.DataEntity;
import com.kaaction.common.utils.excel.annotation.ExcelField;

/**
 * 退货管理Entity
 * @author huanghaiming
 * @version 2017-04-26
 */
public class SalesReturn extends DataEntity<SalesReturn> {
	
	private static final long serialVersionUID = 1L;
	private String categoryId;		// 品类
	private String supplierId;		// 供应商
	private String productCode;		// 货号
	private String sizeId;		// 尺寸
	private String colorId;		// 颜色
	private String amount;		// 数量
	private Date outstockDate;		// 退货时间
	private String conditions;		// 是否残次品
	private String orderNumber;		// 订单号
	private String carrierId;		// 物流公司
	private String waybillNumber;		// 物流号
	private String state;		// 出库状态
	
	
	private double instockPrice;//入库价格
	private double outstockPrice;//出库价格
	private double salesPrice;//售出价格
	private double activePrice;//活动价格
	private double realPrice;//销售实际价格
	
	private String categoryName;		// 品类名称
	private String supplierName;		// 供应商名称
	private String sizeName;		// 尺码名称
	private String colorName;		// 颜色名称
	private String canalId;		// 渠道
	private String canalName;		// 渠道名称
	private String carrierName;		// 快递名称
	
	
	private Date startDate;//开始日期
	private Date endDate;//结束日期
	
	public SalesReturn() {
		super();
	}

	public SalesReturn(String id){
		super(id);
	}

	@Length(min=1, max=64, message="货号长度必须介于 1 和 64 之间")
	@ExcelField(title="货号", align=2, sort=4)
	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}
	
	
	@Length(min=1, max=5, message="数量长度必须介于 1 和 5 之间")
	@ExcelField(title="退货件数", align=2, sort=12)
	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}
	
	@Length(min=0, max=32, message="是否残次品长度必须介于 1 和 4 之间")
	@ExcelField(title="状态", align=2, sort=30)
	public String getConditions() {
		return conditions;
	}

	public void setConditions(String conditions) {
		String sta = "退货（非残次品）";
		if("1".equals(conditions)){
			sta = "退货（残次品）";
		}else if("2".equals(conditions)){
			sta = "供应商退货";
		}
		this.conditions = sta;
	}
	
	@Length(min=0, max=32, message="订单号长度必须介于 0 和 32 之间")
	@ExcelField(title="订单号", align=2, sort=32)
	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}
	
	public String getCarrierId() {
		return carrierId;
	}

	public void setCarrierId(String carrierId) {
		this.carrierId = carrierId;
	}

	@Length(min=0, max=32, message="物流号长度必须介于 0 和 32 之间")
	@ExcelField(title="运单号", align=2, sort=30)
	public String getWaybillNumber() {
		return waybillNumber;
	}

	public void setWaybillNumber(String waybillNumber) {
		this.waybillNumber = waybillNumber;
	}
	
	@Length(min=1, max=4, message="出库状态长度必须介于 1 和 4 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	public String getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}

	public String getSizeId() {
		return sizeId;
	}

	public void setSizeId(String sizeId) {
		this.sizeId = sizeId;
	}

	public String getColorId() {
		return colorId;
	}

	public void setColorId(String colorId) {
		this.colorId = colorId;
	}

	@ExcelField(title="退货时间", align=2, sort=26)
	public Date getOutstockDate() {
		return outstockDate;
	}

	public void setOutstockDate(Date outstockDate) {
		this.outstockDate = outstockDate;
	}

	@ExcelField(title="品类", align=2, sort=2)
	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	@ExcelField(title="供应商", align=2, sort=6)
	public String getSupplierName() {
		return supplierName;
	}

	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}

	@ExcelField(title="尺码", align=2, sort=8)
	public String getSizeName() {
		return sizeName;
	}

	public void setSizeName(String sizeName) {
		this.sizeName = sizeName;
	}

	@ExcelField(title="颜色", align=2, sort=10)
	public String getColorName() {
		return colorName;
	}

	public void setColorName(String colorName) {
		this.colorName = colorName;
	}

	public String getCanalId() {
		return canalId;
	}

	public void setCanalId(String canalId) {
		this.canalId = canalId;
	}

	@ExcelField(title="渠道", align=2, sort=24)
	public String getCanalName() {
		return canalName;
	}

	public void setCanalName(String canalName) {
		this.canalName = canalName;
	}
	
	@ExcelField(title="快递公司", align=2, sort=28)
	public String getCarrierName() {
		return carrierName;
	}

	public void setCarrierName(String carrierName) {
		this.carrierName = carrierName;
	}

	@ExcelField(title="入库价格", align=2, sort=14)
	public double getInstockPrice() {
		return instockPrice;
	}

	public void setInstockPrice(double instockPrice) {
		this.instockPrice = instockPrice;
	}

	@ExcelField(title="出库价格", align=2, sort=16)
	public double getOutstockPrice() {
		return outstockPrice;
	}

	public void setOutstockPrice(double outstockPrice) {
		this.outstockPrice = outstockPrice;
	}

	@ExcelField(title="销售价格", align=2, sort=18)
	public double getSalesPrice() {
		return salesPrice;
	}

	public void setSalesPrice(double salesPrice) {
		this.salesPrice = salesPrice;
	}

	@ExcelField(title="活动优惠", align=2, sort=20)
	public double getActivePrice() {
		return activePrice;
	}

	public void setActivePrice(double activePrice) {
		this.activePrice = activePrice;
	}

	@ExcelField(title="实际销售价格", align=2, sort=22)
	public double getRealPrice() {
		return realPrice;
	}

	public void setRealPrice(double realPrice) {
		this.realPrice = realPrice;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	
}